<?php include ($_SERVER ["DOCUMENT_ROOT"] . "/lib/module/conn_db.php");?>
<?php include ($_SERVER ["DOCUMENT_ROOT"] . "/lib/module/Util.php");?>
<?php //DB Open

	$result = null;
	$db = new MyDB ( false );
	$db->err_report = true;

?>
<?php

	$util = new Util();

	$sid = $_GET['sid'];

	$where = "where category_sid=".$sid;

	$sql = "SELECT category_history2 from tb_category ".$where;

	//echo $sql;

	$db->query ( $sql );
	$query = $db->result;
	$total = mysql_num_rows ($query);
	if($total>0) $root = mysql_fetch_object($query);

?>
<?php //DB Close

	$db->close ();

	$contents = $root->category_history2;
	$contents = str_replace("font-family:바탕;","font-family:굴림;",$contents);
	$contents = str_replace("font-size:14px","font-size:13px",$contents);

	$contents = str_replace("\">관향의연혁"," ;font-size:15px; \">[관향의연혁]",$contents);
	$contents = str_replace("\">가문의유래"," ;font-size:15px\">[가문의유래]",$contents);

	$contents = str_replace("\">관향의 연혁"," ;font-size:15px; \">[관향의연혁]",$contents);
	$contents = str_replace("\"><strong>관향의 연혁"," ;font-size:15px; \"><strong>[관향의연혁]",$contents);

	$contents = str_replace("\">가문의 유래"," ;font-size:15px\">[가문의유래]",$contents);
	$contents = str_replace("\"><strong>가문의 유래"," ;font-size:15px\"><strong>[가문의유래]",$contents);
	$contents = str_replace("\"><span></span>가문의유래"," ;font-size:15px\"><span></span>[가문의유래]",$contents);

	$contents = str_replace("\">본관의연혁"," ;font-size:15px; \">[관향의연혁]",$contents);
	$contents = str_replace("\">본관의 연혁"," ;font-size:15px; \">[관향의연혁]",$contents);

	$contents = str_replace("<span style=\"color:#4c33e5;\"></span>","",$contents);

	$contents = str_replace("<b>","<strong>",$contents);
	$contents = str_replace("</b>","</strong>",$contents);

	

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>한국인의 족보</title>
 </head>

 <body style="background-color:transparent"   oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
  <?php echo $contents;?>
 </body>
</html>
